Surface Additional Parameter Documentation/Tooltips#2222
Merged
andyleejordan merged 6 commits intomainfrom Mar 4, 2025
Merged
Conversation
Contributor
There was a problem hiding this comment.
PR Overview
This PR surfaces additional parameter documentation in completion tooltips by enhancing type extraction logic and updating completion items.
- Updated TryExtractType to also extract documentation and adjusted completion item creation accordingly.
- Added tests for verifying both type and documentation extraction and refactored symbol assertions for improved clarity.
Reviewed Changes
| File | Description |
|---|---|
| src/PowerShellEditorServices/Services/TextDocument/Handlers/CompletionHandler.cs | Updated TryExtractType signature and its usage to extract and populate documentation for parameter and variable completion items. |
| test/PowerShellEditorServices.Test/Language/CompletionHandlerTests.cs | Added tests to validate type and documentation extraction from tooltip text. |
| test/PowerShellEditorServices.Test/Language/SymbolsServiceTests.cs | Refactored symbol assertions to use Assert.Single with predicate lambdas for concise filtering. |
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
Collaborator
Author
|
@andyleejordan ready for review. Won't really do anything until this stuff gets populated on the PS side, but it does fix some tests and lints as well. |
21 tasks
2 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes an issue in type parsing where, if a type is discovered, additional documentation gets trimmed off. This restores that to the
Documentationfield.I did a little experimenting with the new LabelDetail fields in LSP 3.17, but at least in vscode there was little to no visual advantage, something to maybe explore more later.
Would be nice to not have to text parse a string like this but it's where we are at currently with PS API
Related: PowerShell/PowerShell#25108

Related: PowerShell/PowerShell#25112
